package com.methods;

/**
 * 仙人焦类
 * 2017/8/16.
 * @author Erik
 * @version 0.1
 * @since JDK1.9
 * @see com.methods.Fruits
 */
public class Banana extends Fruits{
    String variety;

    public Banana(){}

    /**
     * 三参数构造
     * 初始化所有信息
     * @param shape 形状
     * @param taste 口味
     * @param variety   种类
     */
    public Banana(String shape,String taste,String variety){
        super.setShape(shape);
        super.setTases(taste);
        this.setVariety(variety);
    }


    //setters
    public void setVariety(String variety)  {   this.variety=variety;    }

    //getters
    public String getVariety()  {       return this.variety;    }

    public void advantage(){
        //TODO 描述相关信息
        System.out.println(this.getVariety()+"果形"+this.getShape()+","+this.getTases());
    }


    public void advantage(String color){
        //TODO 重载方法，描述信息
        System.out.println(this.getVariety()+"颜色为黄色");
    }
}
